package edu.sju.ssm.form;

import java.io.Serializable;

import javax.validation.constraints.Digits;
import javax.validation.constraints.NotEmpty;

                                      
public class PublisherForm  {
//	@Digits(fraction=0,integer=Integer.MAX_VALUE,message="id错")
	private String id;
	@NotEmpty(message="不为空")
	private String name;
	@Digits(fraction = 0, integer = 999,message="yearcuo")
	private int yearCreated;
	private String intro;
	
	public PublisherForm() { }

	public PublisherForm(String id, String name, int yearCreated, String intro) {
		this.id = id;
		this.name = name;
		this.yearCreated = yearCreated;
		this.intro = intro;
	}

	public PublisherForm(String name, int yearCreated, String intro) {
		this.name = name;
		this.yearCreated = yearCreated;
		this.intro = intro;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getYearCreated() {
		return yearCreated;
	}

	public void setYearCreated(int yearCreated) {
		this.yearCreated = yearCreated;
	}

	public String getIntro() {
		return intro;
	}

	public void setIntro(String intro) {
		this.intro = intro;
	}

	@Override
	public String toString() {
		return String.format("id: %s, name: %s, yearCreated: %s, intro: %s", 
				id,
				name,
				yearCreated,
				intro);
	}
	
}
